<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.5.3/css/bootstrap.min.css">
</head>
<style>
    body{
        background: url(/static/无标题.jpg);
    }
    .account{
        width: 400px;
        margin: 0 auto;
    }
    .btn1{
        margin-left: 170px;
    }
</style>
<body>
    <div class="account">
        <h1 style="text-align: center;color: beige;">注册</h1>
        <form action="/login/" method="post">
            {% csrf_token %}
            {% for field in form %}
                {% if field.name == 'code' %}
                    <div class="form-group">
                        <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                        <div>
                            <div class="col-md-6" style="padding-left: 0;float: right;"><input class="btn btn-info" type="button" value="获取验证码"></div>
                            <div class="col-md-6" style="padding-left: 0">{{ field }}</div>
                        </div>
                    </div>
                {% else %}
                     <div class="form-group">
                        <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                        {{ field }}
                    </div>
                {% endif %}
            {% endfor %}
            <div class="btn1">
                <input type="submit" class="btn btn-primary" value="注册">
            </div>

        </form>
    </div>
</body>
</html>